
/*****************************************************************/
  /*****************************************************************/
///***   Supplementary appendix to The Incentives of Leaders     ***///
/*****************************************************************/
 /*****************************************************************/
 
 
 
/*****************************************************************/
///***       Table 1: Summary stats                      ***///
/*****************************************************************/

clear
use estimation_file 
sutex executive   worldrulerl1 leadworldeconsharel1    top20leadnum2l1  ///
  vdem globalevent v2xnp_pres  ///
loggdpsize logdistcap emergency  member  anniv    lastterm  ///
divided   communist unsc2  latent_personalism ///
logpop log10income anywar  e_migdpgro intercareer minforeign foreignedu leaderage ///
    gwf_personal gwf_monarchy gwf_military gwf_party  numresols1 numresols1_2, labels minmax
 
 

 
//*************************************************************//
///******  Figure 1                             **************///
//*************************************************************//

clear
use estimation_file

xtlogit executive  worldrulerl1  divided  lastterm v2xnp_pres  communist   loggdpsize logdistcap emergency  member  anniv   globalevent  _spline1 _spline2 _spline3  , re
margins, dydx(*)  post
parmest, saving(m1, replace) 
clear
use m1
drop in 12/14
ren parm vars

replace vars="Emergency session year" if vars=="emergency"
replace vars="Lame duck" if vars=="lastterm"
replace vars="GDP, log" if vars=="loggdpsize"
replace vars="Divided government" if vars=="divided"
replace vars="IO membership" if vars=="member"
replace vars="Anniversary year" if vars=="anniv"
replace vars="Geographic distance" if vars=="logdistcap"
replace vars="Communist regime" if vars=="communist"
replace vars="Leaders attending" if vars=="worldrulerl1"
replace vars="Power concentration" if vars=="v2xnp_pres"
replace vars="Global events" if vars=="globalevent"
    

replace estimate=estimate*100
replace min95=min95*100
replace max95=max95*100 
gsort -estimate
sencode vars, gen(var)

 twoway (rcap min max var,  lcolor(black) lwidth(0.1) horizontal)  ///
     ||  (scatter var estimate, msymbol(d) mfcolor(white) msize(small)), ///
ylabel(1 2 3 4 5 6 7 8 9 10 11 , valuelabel angle(0) labsize(small ) )  ///
 ytitle("") xtitle("")  xscale(titlegap(*5)) scheme(s1mono) ///
xline(0, lwidth(0.1) lcolor(gray) lpattern(dash))  ///
title("All leaders", size(medsmall ))  xlabel(-20(10)10, labsize(small)) ///
 plotregion(margin( t+0 b+0))  legend(off) ysize(4) xsize(4)  
graph export output/margins_append.pdf, replace

clear	



/*********************************************/
/* Table 2:  unsc seat                       */
/*******************************************/

clear
use estimation_file

xtlogit executive  worldrulerl1   lastterm divided  v2xnp_pres communist  unsc2   _spline1 _spline2 _spline3   , re
est store m1
xtlogit executive  worldrulerl1  divided  lastterm v2xnp_pres  communist unsc2 loggdpsize logdistcap emergency  member  anniv   globalevent  _spline1 _spline2 _spline3  , re
est store m2
xtlogit executive  worldrulerl1  divided  lastterm  v2xnp_pres communist unsc2 loggdpsize logdistcap emergency  member  anniv   globalevent   _spline1 _spline2 _spline3   , fe
est store m3
 xtgee executive  worldrulerl1  divided  lastterm  v2xnp_pres communist  unsc2 loggdpsize logdistcap emergency  member  anniv   globalevent  _spline1 _spline2 _spline3, i(ccode) ///
 t(year) corr(exchangeable) family(binomial) link(logit) vce(robust)
 est store m4
 xtlogit executive  worldrulerl1  divided  lastterm v2xnp_pres  communist unsc2 loggdpsize logdistcap emergency  member  anniv  globalevent post2000  _spline1 _spline2 _spline3, re
est store m5
xtlogit executive  worldrulerl1  divided  lastterm v2xnp_pres  communist unsc2 loggdpsize logdistcap emergency  member  anniv  globalevent   _spline1 _spline2 _spline3  if year<2000, re
est store m6
xtlogit executive  worldrulerl1  divided  lastterm v2xnp_pres  communist  unsc2 loggdpsize logdistcap emergency  member  anniv  globalevent   _spline1 _spline2 _spline3  if year>2000, re
est store m7
xtlogit executive  worldrulerl1 divided  lastterm  unsc2 _spline1 _spline2 _spline3  if vdem==1    , re
est store m8
xtlogit executive  worldrulerl1 divided  lastterm  unsc2 emergency   member loggdpsize  anniv  logdistcap globalevent  _spline1 _spline2 _spline3   if vdem==1,  re
est store m9
xtlogit executive worldrulerl1 v2xnp_pres  communist unsc2  _spline1 _spline2 _spline3  if vdem==0, re
est store m10
xtlogit executive worldrulerl1 v2xnp_pres   emergency  unsc2 logdistcap member loggdpsize   anniv communist globalevent _spline1 _spline2 _spline3  if vdem==0, re
est store m11
xtlogit executive  logpop log10income worldrulerl1  divided  lastterm  v2xnp_pres communist  unsc2   _spline1 _spline2 _spline3   , re
est store m12			 
xtlogit executive  intercareer minforeign foreignedu leaderage worldrulerl1 log10income divided  unsc2 lastterm  v2xnp_pres communist   _spline1 _spline2 _spline3   , re
est store m13			 			
xtlogit executive  anywar  e_migdpgro  worldrulerl1  divided  lastterm  log10income v2xnp_pres communist  unsc2  _spline1 _spline2 _spline3   , re
est store m14
estout  m1 m2  m3 m4 m5 m6 m7 m8 m9 m10 m11 m12 m13 m14, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f)))  style(tex) legend label varlabels(_cons Constant) stats(N N_g ll chi2 sigma_u rho, fmt(0 0 2 3) ///
label(N Ncountries Log-likelihood chi2 sigma_u rho)) starlevels(+ 0.10 ** 0.05 *** 0.001) 



/**********************************************************************************/
/*  Table 3: Leaders at the UN, Economic Share   */
/**********************************************************************************/

clear
use estimation_file


xtlogit executive   leadworldeconsharel1 lastterm divided    v2xnp_pres communist    _spline1 _spline2 _spline3   , re
est store m1
xtlogit executive   leadworldeconsharel1  divided  lastterm v2xnp_pres  communist   loggdpsize logdistcap emergency  member  anniv   globalevent  _spline1 _spline2 _spline3  , re
est store m2
xtlogit executive   leadworldeconsharel1  divided  lastterm v2xnp_pres  communist   loggdpsize logdistcap emergency  member  anniv  globalevent   _spline1 _spline2 _spline3  if year<2000, re
est store m3
xtlogit executive   leadworldeconsharel1  divided  lastterm v2xnp_pres  communist   loggdpsize logdistcap emergency  member  anniv  globalevent   _spline1 _spline2 _spline3  if year>2000, re
est store m4
xtlogit executive   leadworldeconsharel1 divided  lastterm   _spline1 _spline2 _spline3  if vdem==1    , re
est store m6
xtlogit executive   leadworldeconsharel1 divided  lastterm   emergency   member loggdpsize  anniv  logdistcap globalevent  _spline1 _spline2 _spline3   if vdem==1,  re
est store m7
xtlogit executive  leadworldeconsharel1 v2xnp_pres  communist   _spline1 _spline2 _spline3  if vdem==0, re
est store m8
xtlogit executive  leadworldeconsharel1 v2xnp_pres   emergency    logdistcap member loggdpsize   anniv communist globalevent _spline1 _spline2 _spline3  if vdem==0, re
est store m9
estout  m1 m2  m3 m4 m6 m7 m8 m9, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f)))  style(tex) legend label varlabels(_cons Constant) stats(N N_g ll chi2 sigma_u rho, fmt(0 0 2 3) ///
label(N Ncountries Log-likelihood chi2 sigma_u rho)) starlevels(+ 0.10 ** 0.05 *** 0.001) 


 /**********************************************************************************/
/* Table 4: Leaders at the UN, Share of Leaders from Top 20 Economies    */
/**********************************************************************************/

clear
use estimation_file


xtlogit executive  top20leadnum2l1  divided  lastterm  v2xnp_pres communist     _spline1 _spline2 _spline3   , re
est store m1
xtlogit executive  top20leadnum2l1 divided  lastterm v2xnp_pres  communist   loggdpsize logdistcap emergency  member  anniv   globalevent  _spline1 _spline2 _spline3  , re
est store m2
xtlogit executive  top20leadnum2l1  divided  lastterm v2xnp_pres  communist   loggdpsize logdistcap emergency  member  anniv  globalevent   _spline1 _spline2 _spline3  if year<2000, re
est store m3
xtlogit executive  top20leadnum2l1  divided  lastterm v2xnp_pres  communist  loggdpsize logdistcap emergency  member  anniv  globalevent   _spline1 _spline2 _spline3  if year>2000, re
est store m4
xtlogit executive  top20leadnum2l1 divided  lastterm   _spline1 _spline2 _spline3  if vdem==1    , re
est store m6
xtlogit executive  top20leadnum2l1 divided  lastterm   emergency   member loggdpsize  anniv  logdistcap globalevent  _spline1 _spline2 _spline3   if vdem==1,  re
est store m7
xtlogit executive top20leadnum2l1 v2xnp_pres  communist  _spline1 _spline2 _spline3  if vdem==0, re
est store m8
xtlogit executive top20leadnum2l1 v2xnp_pres   emergency    logdistcap member loggdpsize   anniv communist globalevent _spline1 _spline2 _spline3  if vdem==0, re
est store m9
estout  m1 m2  m3 m4  m6 m7 m8 m9, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f)))  style(tex) legend label varlabels(_cons Constant) stats(N N_g ll chi2 sigma_u rho, fmt(0 0 2 3) ///
label(N Ncountries Log-likelihood chi2 sigma_u rho)) starlevels(+ 0.10 ** 0.05 *** 0.001) 


 /*********************************************************************************************/
///*** Table 5: Rival Explanations: Leaders’ Personal Background, Travel and Policy     ***///
/*********************************************************************************************/


xtlogit executive logpop log10income worldrulerl1 divided  lastterm   _spline1 _spline2 _spline3  if vdem==1    , re
est store m1
xtlogit executive intercareer minforeign foreignedu leaderage worldrulerl1 divided  lastterm  log10income  _spline1 _spline2 _spline3  if vdem==1    , re
est store m2
xtlogit executive anywar  e_migdpgro  worldrulerl1 divided  lastterm   log10income _spline1 _spline2 _spline3  if vdem==1    , re
est store m3
xtlogit executive logpop log10income worldrulerl1 v2xnp_pres  communist   _spline1 _spline2 _spline3  if vdem==0, re
est store m4
xtlogit executive intercareer minforeign foreignedu leaderage worldrulerl1 v2xnp_pres log10income communist   _spline1 _spline2 _spline3  if vdem==0, re
est store m5
xtlogit executive anywar  e_migdpgro  worldrulerl1 v2xnp_pres  communist   log10income _spline1 _spline2 _spline3  if vdem==0, re
est store m6

estout  m1 m2  m3 m4 m5 m6 , cells(b(star fmt(%9.3f)) se(par fmt(%9.3f)))  style(tex) legend label varlabels(_cons Constant) stats(N N_g ll chi2 sigma_u rho, fmt(0 0 2 3) ///
label(N Ncountries Log-likelihood chi2 sigma_u rho)) starlevels(+ 0.10 ** 0.05 *** 0.001) 


/*****************************************************************/
///***    Table 6: Number of UNGA Resolutions Sponsored      ***///
/*****************************************************************/

ttest numresols1, by(executive)
ttest numresols1_2, by(executive)
ttest numresols1 if unsc2==1, by(executive)
ttest numresols1_2 if unsc2==1, by(executive)
ttest numresols1 if executive==1, by(unsc2)


 
 /*****************************************************************/
///***    Table 7: Dictatorships: Alternative Indicators  ***///
/*****************************************************************/


xtlogit executive worldrulerl1 latent_personalism   communist    _spline1 _spline2 _spline3 if vdem==0, re
est store m1
xtlogit executive worldrulerl1 latent_personalism      logdistcap member loggdpsize   anniv communist globalevent  _spline1 _spline2 _spline3 if vdem==0, re
est store m2
xtlogit executive worldrulerl1 gwf_monarchy gwf_military gwf_personal   communist   _spline1 _spline2 _spline3 if vdem==0, re
est store m3
xtlogit executive worldrulerl1 gwf_monarchy gwf_military gwf_personal    emergency   logdistcap member loggdpsize globalevent   anniv communist  _spline1 _spline2 _spline3 if vdem==0, re
est store m4
estout  m1 m2  m3  m4 , cells(b(star fmt(%9.3f)) se(par fmt(%9.3f)))  style(tex) legend label varlabels(_cons Constant) stats(N N_g ll chi2 sigma_u rho, fmt(0 0 2 3) ///
label(N Ncountries Log-likelihood chi2 sigma_u rho)) starlevels(+ 0.10 ** 0.05 *** 0.001) 

 

/**********************************************************************************/
/* Table 8: Leader Fixed Effects Specifications   */
/**********************************************************************************/
 
 
  clear
use estimation_file

 encode ruler, gen(ruler2)
 sort ruler2 year
 drop if ruler2==ruler2[_n-1] & year==year[_n-1]
 xtset ruler2 year
 


xtlogit executive  worldrulerl1   divided  lastterm  v2xnp_pres communist     _spline1 _spline2 _spline3   , fe
est store m1
xtlogit executive  worldrulerl1  divided  lastterm v2xnp_pres  communist   loggdpsize logdistcap emergency  member  anniv   globalevent  _spline1 _spline2 _spline3  , fe
est store m2
xtlogit executive  worldrulerl1   divided  lastterm v2xnp_pres  communist   loggdpsize logdistcap emergency  member  anniv  globalevent   _spline1 _spline2 _spline3  if year<2000, fe
est store m3
xtlogit executive  worldrulerl1   divided  lastterm v2xnp_pres  communist loggdpsize logdistcap emergency  member  anniv  globalevent   _spline1 _spline2 _spline3  if year>2000, fe
est store m4
xtlogit executive  worldrulerl1  divided  lastterm   _spline1 _spline2 _spline3  if vdem==1    , fe
est store m6
xtlogit executive  worldrulerl1  divided  lastterm  emergency   member loggdpsize  anniv  logdistcap globalevent  _spline1 _spline2 _spline3   if vdem==1,  fe
est store m7
xtlogit executive worldrulerl1  v2xnp_pres  communist   _spline1 _spline2 _spline3  if vdem==0, fe
est store m8
xtlogit executive worldrulerl1  v2xnp_pres   emergency    logdistcap member loggdpsize   anniv communist globalevent _spline1 _spline2 _spline3  if vdem==0, fe
est store m9
estout  m1 m2  m3 m4  m6 m7 m8 m9 , cells(b(star fmt(%9.3f)) se(par fmt(%9.3f)))  style(tex) legend label varlabels(_cons Constant) stats(N N_g ll chi2 sigma_u rho, fmt(0 0 2 3) ///
label(N Ncountries Log-likelihood chi2 sigma_u rho)) starlevels(+ 0.10 ** 0.05 *** 0.001) 


 
/**********************************************************************************/
/* Table 9: Country Fixed Effects Specifications   */
/**********************************************************************************/

clear
use estimation_file


xtlogit executive  worldrulerl1   divided  lastterm  v2xnp_pres communist     _spline1 _spline2 _spline3   , fe
est store m1
xtlogit executive  worldrulerl1  divided  lastterm v2xnp_pres  communist   loggdpsize logdistcap emergency  member  anniv   globalevent  _spline1 _spline2 _spline3  , fe
est store m2
xtlogit executive  worldrulerl1   divided  lastterm v2xnp_pres  communist   loggdpsize logdistcap emergency  member  anniv  globalevent   _spline1 _spline2 _spline3  if year<2000, fe
est store m3
xtlogit executive  worldrulerl1   divided  lastterm v2xnp_pres  communist   loggdpsize logdistcap emergency  member  anniv  globalevent   _spline1 _spline2 _spline3  if year>2000, fe
est store m4

xtlogit executive  worldrulerl1  divided  lastterm   _spline1 _spline2 _spline3  if vdem==1    , fe
est store m6
xtlogit executive  worldrulerl1  divided  lastterm  emergency   member loggdpsize  anniv  logdistcap globalevent  _spline1 _spline2 _spline3   if vdem==1,  fe
est store m7
xtlogit executive worldrulerl1  v2xnp_pres  communist  _spline1 _spline2 _spline3  if vdem==0, fe
est store m8
xtlogit executive worldrulerl1  v2xnp_pres   emergency   logdistcap member loggdpsize   anniv communist globalevent _spline1 _spline2 _spline3  if vdem==0, fe
est store m9
estout  m1 m2  m3 m4  m6 m7 m8 m9, cells(b(star fmt(%9.3f)) se(par fmt(%9.3f)))  style(tex) legend label varlabels(_cons Constant) stats(N N_g ll chi2 sigma_u rho, fmt(0 0 2 3) ///
label(N Ncountries Log-likelihood chi2 sigma_u rho)) starlevels(+ 0.10 ** 0.05 *** 0.001) 

 

 /**********************************************************************************/
/* Table 10: Controlling for Millenium Summit Effect    */
/**********************************************************************************/

clear
use estimation_file

xtlogit executive  worldrulerl1  divided  lastterm  v2xnp_pres communist unsc post2000   _spline1 _spline2 _spline3   , re
est store m1
xtlogit executive  worldrulerl1  divided  lastterm v2xnp_pres  communist  unsc post2000 loggdpsize logdistcap emergency  member  anniv   globalevent  _spline1 _spline2 _spline3  , re
est store m2
xtlogit executive  worldrulerl1  divided  lastterm  v2xnp_pres communist unsc post2000  loggdpsize logdistcap emergency  member  anniv   globalevent   _spline1 _spline2 _spline3   , fe
est store m3
 xtgee executive  worldrulerl1  divided  lastterm  v2xnp_pres communist unsc post2000  loggdpsize logdistcap emergency  member  anniv   globalevent  _spline1 _spline2 _spline3, i(ccode) ///
 t(year) corr(exchangeable) family(binomial) link(logit) vce(robust)
 est store m4
xtlogit executive  i.unsc##c.worldrulerl1  divided  lastterm v2xnp_pres  post2000  loggdpsize logdistcap emergency  member  anniv      communist globalevent  _spline1 _spline2 _spline3   , re
est store m7
xtlogit executive  worldrulerl1 divided  lastterm  post2000 unsc _spline1 _spline2 _spline3  if vdem==1    , re
est store m8
xtlogit executive  worldrulerl1 divided  lastterm  post2000 unsc emergency   member loggdpsize  anniv  logdistcap globalevent  _spline1 _spline2 _spline3   if vdem==1,  re
est store m9
xtlogit executive worldrulerl1 v2xnp_pres  communist  post2000 unsc _spline1 _spline2 _spline3  if vdem==0, re
est store m10
xtlogit executive worldrulerl1 v2xnp_pres   emergency  post2000 unsc logdistcap member loggdpsize   anniv communist globalevent _spline1 _spline2 _spline3  if vdem==0, re
est store m11
estout  m1 m2  m3 m4  m7 m8 m9 m10 m11 , cells(b(star fmt(%9.3f)) se(par fmt(%9.3f)))  style(tex) legend label varlabels(_cons Constant) stats(N N_g ll chi2 sigma_u rho, fmt(0 0 2 3) ///
label(N Ncountries Log-likelihood chi2 sigma_u rho)) starlevels(+ 0.10 ** 0.05 *** 0.001) 



/**********************************************************************************/
/* Table 11: ERM Models with endogenous covariate  */
/**********************************************************************************/
  
xteprobit executive    divided  lastterm v2xnp_pres  communist     , endogenous(worldruler = emergency   anniv   globalevent  _spline1 _spline2 _spline3  ) vce(robust)
est store m1

 xteprobit executive    divided  lastterm v2xnp_pres  communist   loggdpsize logdistcap emergency  member  anniv   globalevent  , endogenous(worldruler = emergency   anniv   globalevent  _spline1 _spline2 _spline3  ) vce(robust)
est store m2
 
 estout  m1 m2  , cells(b(star fmt(%9.3f)) se(par fmt(%9.3f)))  style(tex) legend label varlabels(_cons Constant) stats(N N_g ll chi2 sigma_u rho, fmt(0 0 2 3) ///
label(N Ncountries Log-likelihood chi2 sigma_u rho)) starlevels(+ 0.10 ** 0.05 *** 0.001) 

 /**********************************************************************************/
 /*    sensitivity tests. Requires download of the package: https://www.stephenchaudoin.com/poet.zip , then moving the .ado into the "p" file in your Stata ado directory *******/
 /**********************************************************************************/

  poet  executive    divided  lastterm v2xnp_pres  communist unsc2  loggdpsize logdistcap emergency member  anniv  globalevent  , treat(worldrulerl1) 
 poet  executive    divided  lastterm v2xnp_pres  communist unsc2  loggdpsize logdistcap emergency member  anniv  globalevent  if year>2000, treat(worldrulerl1)  
 poet  executive    divided  lastterm v2xnp_pres  communist unsc2  loggdpsize logdistcap emergency member  anniv  globalevent  if year<2000, treat(worldrulerl1)  
 
 
 
